package com.yingxin.yxerp.module.organization.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yingxin.yx.framework.commons.dto.AttachmentDto;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 用户
 * @author fanchao
 * @since 2021-09-01
 */

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 状态 0 禁用 1 启用 5 申请中
     */
    private String accountStatus;

    /**
     * 锁定标记
     */
    private String lockFlag;

    /**
     * 姓名
     */
    private String staffName;

    /**
     * 用户编号
     */
    private Integer staffNo;

    /**
     * 试用期 SY 在职 ZZ 待离职 DLZ 离职 LZ
     */
    private String staffStatus;

    /**
     * dept_id
     */
    private String deptId;

    /**
     * 头像
     */
    private String avatar;


    /**
     * 首页自定义模块
     */
    private String homeWorkbenchModule;

    /**
     * 备注
     */
    private String remarks;
    /**
     * 账户备注
     */
    private String accountRemarks;

    /**
     * 创建者id
     */
    @TableField(fill = FieldFill.INSERT)
    private String creatorId;

    /** 身份证号*/
    private String idCardNo;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新者id
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updaterId;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 删除标记：0 正常 1 已删除
     */
    @TableLogic
    private String delFlag;

    /**
     * 是否允许APP登录，0 否 1 是
     */
    private String isAppLogon;

    @TableField(exist = false)
    private String roleDesc;

    @TableField(exist = false)
    private String AppRoleDesc;

    @TableField(exist = false)
    private AttachmentDto avatarAttachment;

    @TableField(exist = false)
    private AttachmentDto idCardFrontAttachment;

    @TableField(exist = false)
    private AttachmentDto idCardBackAttachment;

    @TableField(exist = false)
    private List<AttachmentDto> educationAttachmentList;

    @TableField( exist = false )
    private UserWeCom userWeCom;

}
